<?php
declare (strict_types=1);

namespace app\model\system;

use think\Model;

/**
 * 系统用户组
 * Class SystemGroup
 * @package app\model\system
 */
class SystemGroup extends Model
{
    //
    protected $autoWriteTimestamp = true;
    protected $createTime = 'c_time';
    protected $updateTime = 'u_time';

    /**
     * 详情
     * @param $where
     * @param $field
     * @author dgc<453342213@qq.com>
     */
    public function getInfo($where, $field)
    {
        return $this->where($where)
            ->field($field)
            ->find();
    }

    /**
     *  获取列表
     * @param array $where
     * @param string $field
     * @param string $order
     * @author dgc<453342213@qq.com>
     */
    public function getList($where = [], $field = '*', $order = 'id asc')
    {
        return $this->where($where)
            ->field($field)
            ->order($order)
            ->select();
    }
}


